/* 发帖页面样式 */
.create-post-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

.create-post-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.page-header h1 i {
    color: #ffd700;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 表单样式 */
.create-post-form {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 15px;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e1e4e8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1), 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 220px;
    font-family: inherit;
    line-height: 1.6;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 13px;
    margin-top: 8px;
    font-style: italic;
}

/* 字符计数 */
.char-count {
    text-align: right;
    color: #666;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

/* 图片上传区域 */
.image-upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.image-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.1), transparent);
    transition: left 0.5s;
}

.image-upload-area:hover::before {
    left: 100%;
}

.image-upload-area:hover {
    border-color: #4a90e2;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

.upload-placeholder i {
    font-size: 3.5rem;
    color: #ccc;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.image-upload-area:hover .upload-placeholder i {
    color: #4a90e2;
    transform: scale(1.1);
}

.upload-placeholder p {
    font-size: 17px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-placeholder span {
    font-size: 13px;
    color: #999;
}

/* 图片预览 */
.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.image-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

.image-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-item .remove-btn:hover {
    background: rgba(231, 76, 60, 0.9);
    transform: scale(1.1);
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    padding-top: 30px;
    border-top: 2px solid #e1e4e8;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #357abd 0%, #2c5aa0 100%);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e4e8;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .create-post-container {
        margin: 10px auto;
        padding: 0 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .page-header {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .page-header h1 i {
        font-size: 2rem;
    }
    
    .create-post-form {
        padding: 25px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .image-upload-area {
        padding: 30px 20px;
    }
    
    .upload-placeholder i {
        font-size: 2.5rem;
    }
} 